package 读取;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @author Administrator
 * @ClassName ReadFileTest
 * @TIME 星期三 2020/12/30
 */
public class ReadFileTest {
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("D:\\文本\\Demo.txt");
        FileReader fileReader = new FileReader("D:\\文本\\Demo.txt");
        char[] chs = new char[1024];
        int len;
        while((len = fileReader.read()) != -1){
            fw.write(chs,0,len);
        }
        fileReader.close();
        fw.close();
    }
}
